package com.allinpay.merchantweb.common.utils;

import java.util.HashMap;
import com.allinpay.merchantweb.response.AppCommonResponse;
import com.allinpay.merchantweb.response.ResponseData;

public class Layui  extends HashMap<String, Object> {

    public static Layui data(AppCommonResponse<ResponseData> respBean){
        Layui r = new Layui();
        r.put("code", respBean.getSubCode());
        r.put("msg", respBean.getSubMsg());
        r.put("count", respBean.getData().getTotal());
        
        r.put("data", respBean.getData().getDataList());
        return r;
    }
    
    public static Layui data1(AppCommonResponse respBean){
        Layui r = new Layui();
        r.put("code", respBean.getSubCode());
        r.put("msg", respBean.getSubMsg());
        return r;
    }
}
